$OpenBSD: patch-awesomeConfig_cmake,v 1.15 2014/09/11 10:27:17 dcoppa Exp $
--- awesomeConfig.cmake.orig	Fri Apr 11 11:07:10 2014
+++ awesomeConfig.cmake	Wed Sep  3 10:53:42 2014
@@ -16,12 +16,11 @@ option(COMPRESS_MANPAGES "compress manpages" ON)
 option(GENERATE_DOC "generate API documentation" ON)
 
 # {{{ CFLAGS
-add_definitions(-O1 -std=gnu99 -ggdb3 -rdynamic -fno-strict-aliasing -Wall -Wextra
-    -Wchar-subscripts -Wundef -Wshadow -Wcast-align -Wwrite-strings
-    -Wsign-compare -Wunused -Wno-unused-parameter -Wuninitialized -Winit-self
-    -Wpointer-arith -Wformat-nonliteral
-    -Wno-format-zero-length -Wmissing-format-attribute -Wmissing-prototypes
-    -Wstrict-prototypes)
+add_definitions(-std=gnu99 -fgnu89-inline -fno-strict-aliasing
+    -Wchar-subscripts -Wcast-align -Wwrite-strings -Wsign-compare
+    -Wunused -Wno-unused-parameter -Wuninitialized -Wpointer-arith
+    -Wno-format-zero-length -Wmissing-format-attribute
+    -Wmissing-prototypes -Wstrict-prototypes)
 # }}}
 
 # {{{ Endianness
@@ -43,9 +42,6 @@ macro(a_find_program var prg req)
     endif()
 endmacro()
 
-a_find_program(CAT_EXECUTABLE cat TRUE)
-a_find_program(LN_EXECUTABLE ln TRUE)
-a_find_program(GREP_EXECUTABLE grep TRUE)
 a_find_program(GIT_EXECUTABLE git FALSE)
 a_find_program(HOSTNAME_EXECUTABLE hostname FALSE)
 # programs needed for man pages
@@ -53,19 +49,15 @@ a_find_program(ASCIIDOC_EXECUTABLE asciidoc FALSE)
 a_find_program(XMLTO_EXECUTABLE xmlto FALSE)
 a_find_program(GZIP_EXECUTABLE gzip FALSE)
 # lua documentation
-a_find_program(LUA_EXECUTABLE lua FALSE)
-a_find_program(LDOC_EXECUTABLE ldoc FALSE)
-if(NOT LDOC_EXECUTABLE)
-    a_find_program(LDOC_EXECUTABLE ldoc.lua FALSE)
-endif()
+a_find_program(LDOC_EXECUTABLE ldoc${MODLUA_DEP_VERSION} FALSE)
 # theme graphics
 a_find_program(CONVERT_EXECUTABLE convert TRUE)
 # doxygen
 include(FindDoxygen)
 # pkg-config
 include(FindPkgConfig)
-# lua 5.1
-include(FindLua51)
+# lua
+include(FindLua)
 # }}}
 
 # {{{ Check if documentation can be build
@@ -189,7 +181,7 @@ else()
 endif()
 
 # Error check
-if(NOT LUA51_FOUND AND NOT LUA50_FOUND) # This is a workaround to a cmake bug
+if(NOT LUA_FOUND)
     message(FATAL_ERROR "lua library not found")
 endif()
 
@@ -257,7 +249,7 @@ endif()
 if(DEFINED AWESOME_MAN_PATH)
    set(AWESOME_MAN_PATH ${AWESOME_MAN_PATH} CACHE PATH "awesome manpage directory")
 else()
-   set(AWESOME_MAN_PATH ${CMAKE_INSTALL_PREFIX}/share/man CACHE PATH "awesome manpage directory")
+   set(AWESOME_MAN_PATH ${CMAKE_INSTALL_PREFIX}/man CACHE PATH "awesome manpage directory")
 endif()
 
 # Hide to avoid confusion
